
import Taro from '@tarojs/taro';
import { View, Image } from '@tarojs/components'
import Iconfont from '@/components/Iconfont'
import CarInfo from '@/components/CarInfo'
import classnames from 'classnames'
import { staticUrl } from '@/utils'
import './index.scss'

const couponIcon = staticUrl('/img/index/coupon-icon.png')
// 个人信息
export default ({ color }) => {
  const style = {

  }
  return (
    <View className={classnames('mine-box', {
			'alipay-mine-box':process.env.TARO_ENV === 'alipay'
		})} style={{ backgroundColor: color ? color : undefined}}>
      <View className="box_semicircle" style={{ backgroundColor: color ? color : undefined }}></View>
      <View className='view-group'>
        <View className='car-content'>
          <CarInfo styleView='2' />
        </View>
        <View className='card-hd no-border' onClick={() => Taro.navigateTo({ url: '/pages/service/index/index' })}>
          <View className='text'>
            <Image lazyLoad className='text-img' src={couponIcon} />
                                我的余额
                        </View>
          <View className='more'>
            <View className='span'>e服务、红包、年卡、优惠券</View>
						{
							process.env.TARO_ENV !== 'weapp' ? <Iconfont size='20' color='#CCCCCC' name='icon-jiantourukou' />
							:
							<Iconfont size='30' color='#CCCCCC' name='icon-jiantourukou' />
						}
          </View>
        </View>
      </View>
    </View>
  )
}
